package com.example.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.domain.Book;
import com.example.domain.Chart;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface BookDao extends BaseMapper<Book> {
//    @Delete("delete from tbl_book where id=#{id}")
//    int deleteById(Integer id);
//    @Update("update tbl_book set type=#{type},name=#{name},description=#{description} where id=#{id}")
//    int updateById(Book book);
//    @Insert("insert into tbl_book (type,name,description) values(#{type},#{name},#{description})")
//    int insert(Book book);
      @Select("select * from book order by `buy_number` desc limit 5")
      List<Book> getChart();
}
